#ifndef ABOUT_H_INCLUDED
#define ABOUT_H_INCLUDED

/*
    XHoldingPattern
    Copyright (C) 2009 Mike Gehl

    X-Plane Plugin SDK
    Copyright (C) Sandy Barbour and Ben Supnik

    This file is part of XHoldingPattern.

    XHoldingPattern is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    XHoldingPattern is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with XHoldingPattern.  If not, see <http://www.gnu.org/licenses/>.
    ---------------------------------------------------------------------------
    about.h
    Copyright (C) Mike Gehl 2009 <mjgehl@gmail.com>
*/

#include "XPWidgets.h"
#include "XPStandardWidgets.h"

/* Width & Height of About Dialog */
enum about_dialog_size {ABOUT_WIDTH=420, ABOUT_HEIGHT=250};


/**
 * Function to Create and Draw About Dialog
 */
void holdpat_about_dialog(void);

/**
 * Message Handler, closes dialog
 *
 * @param inMessage xpMessage sent
 * @param inWidget widget ID sending the message
 * @param inParam1 not used
 * @param inParam2 not used
 * @return 1 if the message was handled, 0 if passed
 */
int about_dialog_handler(XPWidgetMessage, XPWidgetID, long, long);

/**
 * Given a text string, measure its width and find its left with a given center
 *
 * @param str A null terminated string
 * @param center The x coordinate (pixels) of the center
 * @param x_left A pointer to the left pixel, set within the function
 * @return width of the string in pixels
 */
 float center_text(char *, int, int *);

#endif // ABOUT_H_INCLUDED
